import utils.DBUtils;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class UtilsTest {
    public static void main(String[] args) throws SQLException {
        //获取连接
        Connection conn = DBUtils.getConnection();

        //获取SQL对象
        Statement statement = conn.createStatement();
        int i = statement.executeUpdate("insert into user(username,password) values('伐木机','12345')");
        System.out.println("影响的数据行数:" + i);

        DBUtils.close(null,statement,conn);
    }
}
